package cloud.xlh.digital_power_order.util;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/1/31 17:07
 * @ Description:
 */
public class StackTraceUtil {
    private static final String split = ".";
    public static String getCurrentLocation(Thread thread) {
        StackTraceElement[] stackTrace = thread.getStackTrace();
        return stackTrace[2].getClassName() + split + stackTrace[2].getMethodName() + split + "line" + stackTrace[2].getLineNumber();
    }
}
